import { http } from '@/utils/http'

type walletType = {
  code ?: string,
  msg ?: string,
  data ?: any
}

export const getMoneyAPI = () => {
  return http<walletType>({
    method: 'GET',
    url: '/account/money',
  })
}

export const putMoneyAPI = (Money : number) => {
  return http<walletType>({
    method: 'PUT',
    url: '/account/money',
    data: { money: Money }
  })
}

export const gteMoneyOrderAPI = (amount : number) => {
  return http<walletType>({
    method: 'GET',
    url: `/account/charge?amount=${amount}`,
  })
}
